import xlwings as xw
app = xw.App(visible=False, add_book=False)
workbook = app.books.open('F:\\python\\第3章\\汽车备案信息.xlsx')
worksheet = workbook.sheets['商用车信息']
worksheet.api.Protect(Password='111', Contents=True)
workbook.save()
workbook.close()
app.quit()
